<template>
	<view>


<view style="display: flex; align-items: center; flex-wrap: wrap; justify-content: center;">
		

		  <view style="width: 80%;text-align: center;" class="activity-title-info">{{actity.title}}</view>
		  <view style="width: 80%;text-align: center;"  class="activity-audit-time">{{actity.auditTime}}</view>
		
		
		<view style="width: 80%; text-align: center;">
			<image :src="actity.photo" class="activity-image" style="width: 100%; height: 300rpx; margin-top: 10rpx;padding-left: 20rpx; padding-right: 20rpx;"/></view>
		
		
		<view class="activity-content" style="width: 80%; text-align: center">
		  {{actity.content}}
		</view>
		
		</view>


		
		
		
	</view>
</template>

<script>
	export default {
		data() {
			return {
				id:'',
				actity:'',
				
				
			}
		},
		
		
		onLoad(options) {
			let that=this
		    const id = options.id;
		    console.log('Received ID:', id);
			that.id=id
			
			this.getlist()
			
		    // 可以根据 id 做进一步操作
		},
		methods: {
			
			// getlist(){
			// 	let that=this
			// this.$http({
			// 	url:'api/activity/activity'+that.id,
			// 	method:'get',
			// 	success(res){
			// 		that.activity=res.data.rows
			// 	}
			// })	
			// },
			
			getlist() {
			    let that = this;
			    this.$http({
			        url: `api/activity/activity/${that.id}`, // 使用模板字符串进行拼接
			        method: 'GET', // 确保 HTTP 方法为大写
			    success(res){
					that.actity=res.data.data
					console.log(res.data.data)
				}
				
				})
			}

			
			
			
			
			
		}
	}
</script>

<style>

</style>
